home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / tlx_sq21.zip / DISPLAY.SLT < prev    next >
Text File  |  1992-02-06  |  2KB  |  63 lines

  1. //-----------------------------------------------------------
  2. // DISPLAY.SL? Display setting of some flags.
  3. //
  4. // This script is executed whenever you toggle one of the flags.
  5.  
  6. // Please look at the comments through the whole file, and modify to
  7. // suit your needs, BEFORE you use it. Then recompile with CS DISPLAY
  8. //-----------------------------------------------------------
  9.  
  10. // If you have suggestions for improving this script, please suggest
  11. // improvements to me via old-fashioned snail-mail to:
  12.  
  13. // Author:  Inge Vabekk
  14. //          Hamangskogen 108
  15. //          N-1300 SANDVIKA
  16. //          NORWAY
  17. //          tel. (472) 546 396
  18.  
  19. str sline  [6]
  20.    ,global []="GLOBAL"
  21.    ,ssl    []="SSL"
  22.    ,change []="CHANGE"
  23.    ,read[]="R"                 // To READ from Global script.
  24.    ,write[]="W"                // To WRITE to Global script.
  25.    ;
  26.  
  27.  
  28. //-----------------------------------------------------------
  29. // Script starts here.
  30. //-----------------------------------------------------------
  31.  
  32. main()
  33. {
  34. int number, x, y;
  35.  
  36.   if (call (global,read,change,sline) < 0) return;  // Not defined.
  37.   call (global,write,change,"");                    // Undefine it.
  38.   number = call (ssl);             // Get line number of status line.
  39.   terminal();
  40.   x = getx();
  41.   y = gety();
  42.   pstraxy
  43.     ("  (sonl,noex)  ",27,number,10);    // Write default status.
  44.   gotoxy (x,y);
  45.  
  46.   call (global,read,"LOGOF",sline);      // Get logoff flag.
  47.   if (subchr (sline,0) == 'Y')
  48.   { terminal();
  49.     x = getx();
  50.     y = gety();
  51.     pstraxy ("LGOF",30,number,28);       // Write status.
  52.     gotoxy (x,y);
  53.   }
  54.   call (global,read,"EXIT",sline);
  55.   if (subchr (sline,0) == 'Y')
  56.   { terminal();
  57.     x = getx();
  58.     y = gety();
  59.     pstraxy ("EXIT",35,number,140);      // Write status.
  60.     gotoxy(x,y);
  61.   }
  62. }
  63.